import request from '@/utils/request'

// 查询售后工单列表
export function listScmDefectTicket(query) {
  return request({
    url: '/scm/scmDefectTicket/list',
    method: 'get',
    params: query
  })
}

// 查询售后工单详细
export function getScmDefectTicket(id) {
  return request({
    url: '/scm/scmDefectTicket/' + id,
    method: 'get'
  })
}

// 新增售后工单
export function addScmDefectTicket(data) {
  return request({
    url: '/scm/scmDefectTicket',
    method: 'post',
    data: data
  })
}

// 修改售后工单
export function updateScmDefectTicket(data) {
  return request({
    url: '/scm/scmDefectTicket',
    method: 'put',
    data: data
  })
}

// 删除售后工单
export function delScmDefectTicket(id) {
  return request({
    url: '/scm/scmDefectTicket/' + id,
    method: 'delete'
  })
}
